﻿using Bll.Corpus;
using ShareCode.Entity.Corpus;
using Infrastructure.Attributes.Ioc;
using Microsoft.AspNetCore.Mvc;
using ShareCode.Dto;

namespace ApiApp.Controllers.Corpus
{
    /// <summary>
    /// by zhouxin
    /// action的 900 < SerialNumber < 1000
    ///</summary>
    [ApiController]
    [Route("Corpus/[controller]")]
    [Component(ServiceLifetime.Transient)]
    public class CorpusAdornController : BaseContainTitleController<CorpusAdornEntity>
    {
        protected override CorpusAdornBll? Bll => (CorpusAdornBll?)base.Bll;

        [Autowired]
        public CorpusAdornBll SetBll { set { this._Bll = value; } }


        [HttpPost("ListPageWithType")]
        public async Task<JsonResult> ListPageWithTypeAsync([FromBody] PagingDto? dto = null)
        {
            return await OkkAsync(Bll!.ListPageWithTypeAsync(dto));
        }
        [HttpPost("ListWithType")]
        public async Task<JsonResult> ListWithTypeAsync([FromBody] PagingDto? dto = null)
        {
            return await OkkAsync(Bll!.ListWithTypeAsync(dto));
        }

        [HttpPost("ListPageWithTypeNoDelete")]
        public async Task<JsonResult> ListPageWithTypeNoDeleteAsync([FromBody] PagingDto? dto = null)
        {
            return await OkkAsync(Bll!.ListPageWithTypeNoDeleteAsync(dto));
        }
        [HttpPost("ListWithTypeNoDelete")]
        public async Task<JsonResult> ListWithTypeNoDeleteAsync([FromBody] PagingDto? dto = null)
        {
            return await OkkAsync(Bll!.ListWithTypeNoDeleteAsync(dto));
        }
    }
}
